package com.dfrz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dfrz.entity.User;
import com.dfrz.entity.Video;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author 29877
 */
@Mapper
public interface IUserMapper extends BaseMapper<User> {
    //根据uid查询用户信息
    User selectById(int uid);
    //根据账号密码查找用户
    User loginbypwd(@Param("account") String account, @Param("pwd") String pwd);
    //根据账号查找账户
    //根据uid查询用户信息
    @Select("select * from user where account=#{account}")
    User selectByaccount(String account);
    Integer adduser(User user);

    @Update("update user set vip_status=1, vip_date=#{date} where uid=#{uid}")
    void updatevip(@Param("uid") Integer uid,@Param("date") String date);
    
    List<Object> getUserById(@Param("uid") Integer uid);
}
